/******************
 * 基础 - 登录 - mock
 *****************/

// 登录
function Fn(data) {
    return {
        code: 200,
        msg: "success",
        data,
    };
}

export default {
    /**
     * 基础 - 登录
     * @param： {}
     * @returns：Promise {<pending>}
     **/
    "post|login": (option) => {
        return Fn({});
    },
    "get|mock/list": (option) => {
        return Fn([

            {
                name: "系统管理",
                url: "/manger",
                view: "User",

                redirect: "/User",
                children: [
                    {name: "用户", url: "/User", view: "User"},
                    {name: "1", url: "/menu", view: "Menu"},
                    {name: "2", url: "/role", view: "Role"},
                ],
            },

        ]);
    },
    "get|mock/curdlist": (option) => {
        return Fn({
            list: [
                {
                    key: "1",
                    name: "胡彦斌",
                    age: 32,
                    address: "西湖区湖底公园1号",
                },
                {
                    key: "2",
                    name: "胡彦祖",
                    age: 42,
                    address: "西湖区湖底公园1号",
                },
            ],
            page: 1,
            pageSize: 10,
            total: 30,
        });
    },
};
